package me.jiatao.androidstudy;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;

import me.jessyan.autosize.AutoSizeConfig;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        AutoSizeConfig.getInstance().stop(this);
        setContentView(R.layout.activity_main);
    }


    public void startAutoSize(View view) {
        Toast.makeText(this, "开启自适应", Toast.LENGTH_SHORT).show();
        AutoSizeConfig.getInstance().restart();
    }

    public void stopAutoSize(View view) {
        Toast.makeText(this, "关闭自适应", Toast.LENGTH_SHORT).show();
        AutoSizeConfig.getInstance().stop(this);
    }

    public void gotoMain3Activity(View view) {
        startActivity(new Intent(this,Main3Activity.class));
        finish();
    }
}
